<!DOCTYPE html>
<html lang="en">

<head>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box {
            width: 500px;
            height: 500px;
            background-color: #000;
            margin: 100px auto;

        }

        p {
            width: 480px;
            height: 480px;
            background-color: #f0f0f0;
            float: left;
            margin-top: 10px;
            margin-left: 10px;
            font-size: 13px;
            display: none;
        }

        .hover {
            display: block;
            cursor: crosshair;
        }
    </style>
</head>

<body>
    <div class="box" id="big">
        <p id="p">鼠标划入改变样式，移除恢复</p>
    </div>
</body>
<script>
    var div = document.getElementById('big')
    var p = document.getElementById('p')
    // console.log(p);
    div.onmouseover = function () {
        p.className = "hover"
    };
    div.onmouseout = function () {
        p.className = ""
    }

 
</script>

</html>